home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / StandardFile.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  4.6 KB  |  181 lines  |  [TEXT/MPS ]

  1. ;    File:        StandardFile.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGSTANDARDFILE__') = 'UNDEFINED' THEN
  12. __INCLUDINGSTANDARDFILE__    SET    1
  13.  
  14.  
  15. StandardFileReply    RECORD    0
  16. sfGood                    DS.B    1                    ; ST if OK hit
  17. sfReplacing                DS.B     1                      ; ST if user requested "replace existing"
  18. sfType                     DS.L    1                     ; type of file
  19. sfFile                    DS.B    70                    ; FSSpec (vRefNum, parID, name)
  20. sfScript                DS.W    1                    ; ScriptCode of filename
  21. sfFlags                    DS.W    1                    ; Finder flags
  22. sfIsFolder                 DS.B    1                    ; ST if item is a folder
  23. sfIsVolume                 DS.B    1                    ; ST if item is a volume
  24. sfReserved1                 DS.L    1                    ; reserved set to 0
  25. sfReserved2                 DS.W    1                    ; reserved set to 0 
  26.                     ENDR
  27.  
  28.  
  29. SFReply        RECORD    0
  30. good            DS.B    1    ; ST if OK hit
  31. copy            DS.B    1    ; ST replacing ???
  32. fType             DS.L    1     ; type of file or DirID
  33. vRefNum            DS.W    1    ; vRefNum or WDRefNum
  34. version            DS.W    1    ; unused
  35. fName            DS.B    64    ; name of file
  36.             ENDR
  37.  
  38. ; pseudo-item hits for use in DlgHook
  39. sfHookFirstCall        EQU         -1
  40. sfHookCharOffset    EQU         $1000
  41. sfHookNullEvent        EQU         100
  42. sfHookRebuildList    EQU         101
  43. sfHookFolderPopUp    EQU         102
  44. sfHookOpenFolder    EQU         103
  45. ; the following are only in system 7.0+ 
  46. sfHookOpenAlias            EQU     104
  47. sfHookGoToDesktop        EQU     105
  48. sfHookGoToAliasTarget    EQU     106
  49. sfHookGoToParent        EQU        107
  50. sfHookGoToNextDrive        EQU        108
  51. sfHookGoToPrevDrive        EQU        109
  52. sfHookChangeSelection    EQU        110
  53. sfHookSetActiveOffset    EQU     200
  54. sfHookLastCall            EQU     -2
  55.  
  56.  
  57. ; resource IDs and item offsets of pre-system 7.0 dialogs 
  58. putDlgID          EQU         -3999                     ; SFPutFile dialog template ID
  59. putSave           EQU         1                         ; save button
  60. putCancel         EQU         2                         ; cancel button
  61. putPrompt        EQU            3                        ; prompt, i.e. Save document as:
  62. putVolume        EQU            4                        ; volume icon and name
  63. putEject          EQU         5                         ; eject button
  64. putDrive          EQU         6                         ; drive button
  65. putName           EQU         7                         ; editTExt item for file name
  66. putNmList         EQU         8                         ; userItem for file name list
  67.  
  68.  
  69. getDlgID          EQU         -4000                     ; SFGetFile dialog template ID
  70. getOpen           EQU         1                         ; open button
  71. getCancel         EQU         3                         ; cancel button
  72. getEject          EQU         5                         ; eject button
  73. getDrive          EQU         6                         ; drive button
  74. getNmList         EQU         7                         ; userItem for file name list
  75. getScroll         EQU         8                         ; userItem for scroll bar
  76. getGrayBar        EQU            9                        ; grey line between buttons
  77.  
  78.  
  79. ; resource IDs and item offsets of system 7.0+ dialogs 
  80. sfPutDialogID            EQU -6043
  81. sfGetDialogID            EQU -6042
  82. sfItemOpenButton        EQU    1
  83. sfItemCancelButton        EQU    2
  84. sfItemBalloonHelp        EQU 3
  85. sfItemVolumeUser        EQU 4
  86. sfItemEjectButton        EQU 5
  87. sfItemDesktopButton        EQU 6
  88. sfItemFileListUser        EQU 7
  89. sfItemPopUpMenuUser        EQU 8
  90. sfItemDividerLinePict    EQU    9
  91. sfItemFileNameTextEdit    EQU    10
  92. sfItemPromptStaticText    EQU 11
  93. sfItemNewFolderUser        EQU 12
  94.  
  95.  
  96. ; the refcon field of the dialog record during a modalfilter or dialoghook contains one the following
  97. sfMainDialogRefCon        EQU        'stdf'
  98. sfNewFolderDialogRefCon    EQU        'nfdr'
  99. sfReplaceDialogRefCon    EQU        'rplc'
  100. sfStatWarnDialogRefCon    EQU        'stat'
  101. sfLockWarnDialogRefCon    EQU        'lock'
  102. sfErrorDialogRefCon        EQU        'err '
  103.  
  104.  
  105. ; Routine selectors
  106. selectorSFPutFile         EQU     1
  107. selectorSFGetFile         EQU     2
  108. selectorSFPPutFile        EQU     3
  109. selectorSFPGetFile        EQU     4
  110. selectorStandardPutFile    EQU        5
  111. selectorStandardGetFile    EQU        6
  112. selectorCustomPutFile    EQU        7
  113. selectorCustomGetFile    EQU        8
  114.  
  115.  
  116.  
  117.                   MACRO
  118.                   _SFPutFile
  119.                   MOVE.W     #selectorSFPutFile,-(SP)
  120.                 _Pack3
  121.                   ENDM
  122.  
  123.                   MACRO
  124.                   _SFGetFile
  125.                   MOVE.W     #selectorSFGetFile,-(SP)
  126.                 _Pack3
  127.                   ENDM
  128.  
  129.                   MACRO
  130.                   _SFPPutFile
  131.                   MOVE.W     #selectorSFPPutFile,-(SP)
  132.                 _Pack3
  133.                   ENDM
  134.  
  135.                   MACRO
  136.                   _SFPGetFile
  137.                   MOVE.W     #selectorSFPGetFile,-(SP)
  138.                 _Pack3
  139.                   ENDM
  140.                 
  141.                  MACRO
  142.                   _StandardPutFile
  143.                   MOVE.W     #selectorStandardPutFile,-(SP)
  144.                 _Pack3
  145.                   ENDM
  146.  
  147.                   MACRO
  148.                   _StandardGetFile
  149.                   MOVE.W     #selectorStandardGetFile,-(SP)
  150.                 _Pack3
  151.                   ENDM
  152.  
  153.                    MACRO
  154.                   _CustomPutFile
  155.                   MOVE.W     #selectorCustomPutFile,-(SP)
  156.                 _Pack3
  157.                   ENDM
  158.  
  159.                  MACRO
  160.                   _CustomGetFile
  161.                   MOVE.W     #selectorCustomGetFile,-(SP)
  162.                 _Pack3
  163.                   ENDM
  164.  
  165.  
  166. ; old style equates for compatability
  167.  
  168. ; Reply record data structure
  169. rGood             EQU         0                         ; ignore command if FALSE
  170. rType             EQU         2                         ; file type
  171. rVolume           EQU         6                         ; volume reference number
  172. rVersion          EQU         8                         ; file's version number
  173. rName             EQU         10                        ; file name
  174.  
  175. ; Routine selectors
  176. sfPutFile         EQU         1
  177. sfPPutFile        EQU         3
  178. sfGetFile         EQU         2
  179. sfPGetFile        EQU         4
  180.  
  181.     ENDIF    ; ...already included